<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
<head>
<meta charset="UTF-8">
<title>springbootTest</title>
<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js">
</script>
</head>
<body>
	<h1>hello springboot !</h1>
	<h2>springboot + jpa 增删该差例子</h2>
	<h3>新增</h3>
	<hr>
	<label>姓名：</label>
	<input id = "name" name = "name"><button onclick="save()">保存</button>
	<h3>查询列表</h3>
	<hr>
	<button>查询</button>
	<h3>通过id查询</h3>
	<hr>
	<input><button>查询</button>
	<h3>修改</h3>
	
	<div th:replace="~{fragments/footer :: footer}">...</div>
</body>
<script type="text/javascript">
function save(){
	var name = $("#name").val();
	var url = "/student/save";
	$.ajax({
		url:url,
		type:"POST",
		data:{
			name:name
		},
		success:function(r){
			alert('保存成功');
		}
	});
}
</script>
</html>